<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<title>评论</title>
		<base href="{$_G['siteurl']}" />
		<link href="static/jquery_weui/css/weui.min.css" rel="stylesheet">
		<link href="static/jquery_weui/css/jquery-weui.min.css" rel="stylesheet">
		<link href="static/dzzicon/icon.css" rel="stylesheet">
		<link href="{MOD_PATH}/css/mobile/index.css" rel="stylesheet">
		<link href="{MOD_PATH}/css/mobile/package.css" rel="stylesheet">
		<script type="text/javascript">var DZZSCRIPT='{DZZSCRIPT}',LANG='{$_G[language]}', STATICURL = 'static/', IMGDIR = '{$_G[setting][imgdir]}', VERHASH = '{VERHASH}', charset = '{CHARSET}', dzz_uid = '$_G[uid]', cookiepre = '{$_G[config][cookie][cookiepre]}', cookiedomain = '{$_G[config][cookie][cookiedomain]}', cookiepath = '{$_G[config][cookie][cookiepath]}',attackevasive = '{$_G[config][security][attackevasive]}', disallowfloat = '{$_G[setting][disallowfloat]}',  REPORTURL = '$_G[currenturl_encode]', SITEURL = '$_G[siteurl]', JSPATH = '$_G[setting][jspath]',MOD_PATH='{MOD_PATH}',APP_URL='{MOD_URL}',MOD_URL='{MOD_URL}';</script>
	</head>
	<body>
		<!--列表开始-->
		<section class="weui-cells weui-cells__recent weui-cells__margin_footer" id="commentlist">

		</section>
		<!--无内容提示页-->
		<div class="weui-cell-search-normal" style="display: none;">
				<!--{template mobile/template_normal}-->
		</div>
		<!--列表结束-->
		<footer class="weui-footer">
			<div class="weui-footer-comment">
				<a href="javascript:;" class="weui-footer-create-comment commentadd">
					<i class="dzz dzz-create"></i>
					<p>评论</p>
				</a>
			</div>
		</footer>
	</body>
	<script type="text/javascript" src="static/jquery/jquery.min.js"></script>
	<script type="text/javascript" src="static/jquery_weui/js/jquery-weui.min.js"></script>
	<script type="text/javascript" src="{MOD_PATH}/js/mobile/appevent.js"></script>
	<script type="text/javascript">
        var rid = '{$rid}',fid = '{$fid}';
        $(function(){
            $.post(MOD_URL+'&op=mobile&do=comment&operation=filelist',{'rid':rid,'fid':fid,k:Math.random()},function(html){
                if(html){
                    $('#commentlist').html(html);
                }else{//待处理
                    $('#commentlist').html('暂无数据');
                }
            })
            //删除评论
            $(document).off('tap.delcomment').on('tap.delcomment','.delete-swipeout',function(){
                var obj = $(this),commentid = obj.data('commentid');
                $.post(MOD_URL+'&op=mobile&do=comment&operation=delcomment',{'id':commentid,k:Math.random()},function(data){
                    if(data['success']){
                        obj.closest('.weui-cell_swiped').remove();
                    }else{
                        $.toast(data['error'])
                    }
                },'json')
            })
            //新增评论
            $(document).off('tap.commentadd').on('tap.commentadd','.commentadd',function(){
                window.location.href = MOD_URL+'&op=mobile&do=comment&operation=commentadd&rid='+rid+'&fid='+fid;
            })
        })
        //获取id高度
        function height(){
            var h = $(document).outerHeight(true);
            var h2 = $('.weui-cell-footer').outerHeight(true);
            $('.weui-cell-search-images').css('height',h-h2);
        }
	</script>
	<!--{eval output();}-->
</html>

